<?php

namespace app\admin\model;

use think\Model;

class Site extends Model
{
    //
    protected $table = 'sites';

    protected $autoWriteTimestamp = 'datetime';

    protected $dateFormat = 'Y-m-d H:i:s';

    protected $createTime = 'created_at';
    protected $updateTime = 'updated_at';

    public function sitecategory()
    {
        return $this->belongsTo('Sitecategory', 'site_node_id');

    }

    public function photo()
    {
        return $this->belongsTo('Photo', 'photo_id');
    }

}
